package com.mdhw.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mdhw.common.enums.StatusEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.mdhw.system.dao.SysAccountDao;
import com.mdhw.system.entity.SysAccount;
import com.mdhw.system.service.SysAccountService;


/**
* @author amoyiki
* @date 2022-03-28
*/

@Slf4j
@Service
public class SysAccountServiceImpl extends ServiceImpl<SysAccountDao, SysAccount> implements SysAccountService {

    @Override
    public SysAccount queryAccpount(String accessKey, String accessSecret) {
        QueryWrapper<SysAccount> query = new QueryWrapper<>();
        query.lambda().eq(SysAccount::getStatus, StatusEnum.OK.getCode());

        return this.getOne(query);
    }
}
